package com.itheima.extendsconstructor;


//子类
public class Consultant extends Person {

    private int number;

    public Consultant() {
    }

    //子类构造器调用父类构造器的应用场景：
    //可以把子类继承自父类的这部分数据也完成初始化赋值
    public Consultant(String name, int age, String gender, int number) {
        super(name, age, gender);
        this.number = number;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }
}
